<?php

/**
 * TipoComprobante filter form base class.
 *
 * @package    sf_sandbox
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseTipoComprobanteFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'nombre'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'abreviatura' => new sfWidgetFormChoice(array('choices' => array('' => '', 'FC' => 'FC', 'FO' => 'FO', 'RD' => 'RD', 'FCPF' => 'FCPF', 'CD' => 'CD', 'NDC' => 'NDC', 'NDO' => 'NDO'))),
    ));

    $this->setValidators(array(
      'nombre'      => new sfValidatorPass(array('required' => false)),
      'abreviatura' => new sfValidatorChoice(array('required' => false, 'choices' => array('FC' => 'FC', 'FO' => 'FO', 'RD' => 'RD', 'FCPF' => 'FCPF', 'CD' => 'CD', 'NDC' => 'NDC', 'NDO' => 'NDO'))),
    ));

    $this->widgetSchema->setNameFormat('tipo_comprobante_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'TipoComprobante';
  }

  public function getFields()
  {
    return array(
      'id'          => 'Number',
      'nombre'      => 'Text',
      'abreviatura' => 'Enum',
    );
  }
}
